package com.namo.ccharticle.dao;

import com.namo.ccharticle.entity.ArticleType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author  WangXin
 * @date  2021/5/19 10:38
 */

@Mapper
public interface ArticleTypeMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(ArticleType record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(ArticleType record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    ArticleType selectByPrimaryKey(String id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(ArticleType record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(ArticleType record);

    /**
     * 通过文章ID寻找文章类型
     * @param articleId
     * @return
     */
    List<ArticleType> selectByArticleId(String articleId);
}